
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt



#-------------------------------------#
#   设置数据集的路径
#   csv_path   训练集数据和标签
#   valid_csv_path   验证集数据和标签
#-------------------------------------#
train_csv_path   = "train_Dataset.csv"
valid_csv_path   = "valid_Dataset.csv"

train_csv = pd.read_csv(train_csv_path)
train_data = np.array(train_csv)

valid_csv = pd.read_csv(valid_csv_path)
valid_data = np.array(valid_csv)

train_x, train_y = train_data[:, :-1], train_data[:, -1].astype(int)
valid_x, valid_y = valid_data[:, :-1], valid_data[:, -1].astype(int)

label1_train = train_x[train_y==0]
label2_train = train_x[train_y==1]
label3_train = train_x[train_y==2]

label1_valid = valid_x[valid_y==0]
label2_valid = valid_x[valid_y==1]
label3_valid = valid_x[valid_y==2]

plt.scatter(label1_train[:, 0], label1_train[:, 2], c='r', marker='.')
plt.scatter(label2_train[:, 0], label2_train[:, 2], c='g', marker='.')
plt.scatter(label3_train[:, 0], label3_train[:, 2], c='b', marker='.')
plt.scatter(label1_valid[:, 0], label1_valid[:, 2], c='r', marker='.')
plt.scatter(label2_valid[:, 0], label2_valid[:, 2], c='g', marker='.')
plt.scatter(label3_valid[:, 0], label3_valid[:, 2], c='b', marker='.')

plt.xlabel('image mean', fontdict={'size': 15, 'color': 'red'})
# plt.ylabel('fire mea', fontdict={'size': 15, 'color': 'red'})
plt.ylabel('fire area', fontdict={'size': 15, 'color': 'red'})

plt.show()


